package com.doctcloud.hisinfo.outpbill.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.doctcloud.common.core.utils.StringUtils;
import com.doctcloud.hisinfo.histable.domain.outpbill.OutpBillItemsDo;
import com.doctcloud.hisinfo.outpbill.mapper.OutpBillItemsMapper;
import com.doctcloud.hisinfo.outpbill.service.IOutpBillItemsService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class OutpBillItemsService extends ServiceImpl<OutpBillItemsMapper, OutpBillItemsDo> implements IOutpBillItemsService {
    @Override
    public List<OutpBillItemsDo> listByRcpt(String rcptNo) {
        List<OutpBillItemsDo> resList = new ArrayList<>();
        if (StringUtils.isEmpty(rcptNo)){
            return resList;
        }
        LambdaQueryWrapper<OutpBillItemsDo> query = new LambdaQueryWrapper<>();
        query.eq(OutpBillItemsDo::getRcptNo,rcptNo);
        return baseMapper.selectList(query);
    }
}
